import http from "@/api";
import { Login } from "@/api/interface";
import { UserInfo } from "@/stores/interface";
/**
 * @name 登录模块
 */
// 用户登录
export const loginApi = (params: Login.DoLoginFrom) => {
  return http.post<string>("/do_login", params, { noLoading: true });
};
//获取验证码
export const getCaptcha = () => {
  return http.get<Login.Captcha>("/get_captcha", {}, { noLoading: true });
};
//退出登录
export const loginOutApi = () => {
  return http.get("/log_out");
};
//用户信息
export const personalApi = () => {
  return http.get<UserInfo>("/personal_info");
};
